package 书类;
import java.util.Collections;  
import java.util.Iterator;  
import java.util.LinkedList;  
import java.util.List;  

public class Textbook {

	public static void main(String[] args) {
		List<Book>list=new LinkedList<Book>();  
	    list.add(new Book("Java",25));  
	    list.add(new Book("数据库技术",30));  
	    list.add(new Book("C++",29));  
	    Book book1=new Book("计算机网络技术",29);  
	    Iterator<Book> it=list.iterator();  
	   System.out.println("新书：计算机网络技术与下列图书：");  
	    while(it.hasNext()){  
	        Book book=it.next();  
	        if(book1.price==book.price)
	        System.out.println(book.name);  
	    }  
	      
	      System.out.println("具体价格为："+book1.price);  
	  }  

	}


